Index

Index:

Intro	Introduction to OttoSource

Display	The OttoSource display and buttonbar

Using	Using OttoSource

FileViewer	The File Viewer

History List	The History List

Printing	Printing

Configuring	Configuring

Multitasking	Multitasking Searches


Introduction

OttoSource is a utility that lets you search and browse text files for strings. These could be function names, macros or whatever you like. You can specify file masks as well as a search string. OttoSource lists the hits in one pane and lets you browse them in a separate window.

Prerequisites

OttoSource requires Windows 3.1.

Constraints

The following limits are imposed:

file size:	available memory

record number: 	2 million

record size:        	4k

Only text files are displayed (files with chars > space, CR,LF,EOF,FF).

Copyright

OttoSource is a copyrighted work of Doug Overmyer, 1993.

Distribution Terms

OttoSource may be freely used in any non-commercial setting . It may not be distributed in conjunction with any commercial or for-fee product unless prior approval is obtained from the author. Use in a commercial setting must also be arranged with the author.

Disclaimer

You use OttoSource entirely at your own risk. Only you can determine its suitability for your configuration and needs. No other warranties are offered or implied.

Notices:

Arts & Letters® is a registered trademark of Computer Support Corporation. CorelDRAW® is a registered trademark of Corel Systems Corporation. Micrografx is a registered trademark of Micrografx, Inc. GIF is a a registered trademark of CompuServe Inc.	=>Next


Display
The OttoSource Display

OttoSource consists of a single window with several configurable panes. At the top are (optionally) a toolbar and options bar. Below are three splitter windows on the left, and a file viewer window on the right. When you finally select a file, it will appear in the file view window.  Before you can get anything out of OttoSource, you have to establish a few parameters. The OttoSource screen looks like this:

Choose View/Toolbar to display the toolbar, and View/Options to show the option bar.

On the left are 3 splitter panes that display the current status:

Location	Name	Content

top 	Directory Status	lists current directory

middle	Selected Files 	files that match the file extention spec & path

bottom  	Search Files 	results of most recent file search

You can adjust the splitter panes by moving the mouse over one of the heavy bars and dragging it to

resize the pane.

Toolbar

OttoSource displays an optional toolbar that gives access to most of the menu options.

From left to right, the options are:

*Change directory

*Copy to clipboard

*Append to clipboard

*Print file

*Delete file

*Select font

*Find text

*Search files

*Reload from file history list

*Toggle selection bar on/off

*Toggle line numbers on/off

*Help

Selection Bar

OttoSource displays an optional selction bar that lets you specify the file selection criteria.

From left to right, the options are:

* Search Text

* Paths:

* Ext(ensions)

Deep Search

Check Case

Whole Words

You can toggle the selection bar On/Off using the 'switch' icon on the toolbar.	=>Next


Using OttoSource
Putting OttoSource to Work

To use OttoSource, you need to do three things:

(1) set the file selection criteria

(2) search the disk (optional)

(3) choose a file from one of the result windows.

Your choice then appears in the file viewer on the right.

Selecting Files

To start  with, you must indicate the kind of files (extensions) that OttoSource should look at and what directories to look in (paths). We will call this selecting files - the results are displayed in the Selected

Files window.

To make a selection, be sure the toolbar and option bar are visible. There are two fields to fill out:

Paths:	a comma separated list of paths to search [optional]

Ext(ensions): 	select files with these extensions (wild cards OK) e.g. .h,.cpp

To do anything useful with OttoSource, you must have at least one entry in the Ext(ensions) field.  The default is ".*".  The Paths field defaults to the current file directory. OttoSource uses these two criteria to build the list of files in the Selected Files window.

Each "field" is actually a combo box that remembers the entries you type (they are also saved from session to session). You can recall a prior entry by pulling down the combo list box and selecting an item. This way you will build up a list of your favorite search directories and file types which you can use to quickly set things up.

To change the default directory, click the Directory button on the toolbar, choose File/Change Directory from the menu, or right click on the directory display pane. Use the dialog box to navigate the disk, then click OK. The Selected Files window updates automatically.

Searching  files

You can further refine your quest by specifying a text string in the "Search Text" field and clicking the File Search toolbar button/Menu item. OttoSource will open each file in the Selected File list and look for the Search Text that you have specified. When it finds a match, the file is added to the Search File window.

If you check the Deep Search option, OttoSource checks files in each specified directory (in the Paths field) and all subdirectories, otherwise it sticks with the specified ones. If you choose Check Case then the case must match the target string exactly. If you choose Whole Word than only whole words that contain the search string will match.

Please note that the Search Files window does not just reflect files in the current directory - it lists everything found in the most recent search.

Viewing files

Finally - click in either the Selected or Search File windows, and view the file on the right.	=>Next


File Viewer

The file view window lets you browse the source file you've chosen. You can click the Find Text button on the toolbar or choose an Edit/Find option from the menus.to search for text. OttoSource will hunt up the next line that matches the "Text Search" field.  If found, the window scrolls to the matching line and highlights the text. The Check Case and Whole Word options apply here too.

Various keys are available for moving around in the file:

Home / End	move to top and bottom of the file

Pg Up / Pg Dn 	move up and down by a screen full of lines

Up / Down Arrows	move one line at a time.

The scroll bars also work.

Selecting Text

You can select text by clicking on a line, and dragging the cursor up or down - the lines are redrawn in reverse video. If you go above or below the fileview window, the text automatically scrolls into view and extends the selection. To end your selection with the mouse, move the cursor back into the file view window, and release the mouse button.  If you release outside of the window, the selection is cancelled.  Alternately, you can use the keyboard. Start a selection by pressing the Space bar - the top visible line is selected. To extend the selection, hold down the shift key, and use the Home/End or Up/Down arrow or Pg Up/Pg Dn keys to extend the selection. The Esc key cancels any existing selection.

Clipboard Support

Once you've selected some text, you can copy it to the clipboard by choosing Edit/Copy from the menu. If desired, you can append it to existing text on the clipboard by choosing Edit/Append.

LineNumbers

You can display line numbers at the left of the file view window by choosing View/LineNumbers or clicking the Line Number icon. The current option also applies to any printed output you request. See Printing

If you double-click on a word, it is copied to the Text Search field.	=>Next


Printing

You can print the current file by choosing File/Print from the menu or click the Printer icon. You may want to preview the output using File/Print Preview first. The output format is based on the following:

current line number setting

margin

header

font.

The margin and header option are set in the configuration dialog - see Configuring. The current viewing font is also used for printed output.

If you select the header option, OttoSource will print a header at the top of each page of output. The header contains the file name, DOS file date and time stamp, and the current page number.

Please note that OttoSource does not wrap lines - they are truncated on the right if too wide to fit the paper. Printing operations are speeded greatly if you choose a printer device font.	=>Next


OttoSource Configuration
Configuring OttoSource

Choose File/Configure to start the configuration dialog:

The File/Configure dialog lets you set various options for your viewing and printing pleasure:

* Tab size

* Line numbers

* Print margin (left, in inches)

* Header (pathname, date/time stamp, page number)

* Multitask searches

Tabs are expanded when the file is first read - if you need to change the setting for the current file, you

will need to change the configuration, and force a reload.

You can also choose File/Reset Criteria to clear all the selection criteria stored in the combo boxes.

If you wish to increase the multitasking behavior of OttoSource,  you can edit the OTTOSRC.INI file manually. See the OTTOSRC.WRI file.	=>Next


Multitasking Searches

Choose File/Configure to start the configuration dialog. You can set an option to have OttoSource multitask (yield control to other applications) during file operations. This is most useful if you have very extensive searches in mind, or the files are large (>500K). Of course turning on multitasking slows down the searches somewhat, so you have to experiment some. While OttoSource is busy searching or loading a file, it will not let you change critical state information, such as the current file, directory, search string and so forth. In any case, if you succeed in fooling it, the program is bound to crash, so use the opportunity to work with some other application, not OttoSource.	=>Next


History List

OttoSource maintains a list of the last 25 files you have looked at during each session. To quickly return to one, choose Search/Previous File to return to the prior file, or Search/History to select a file name from a listbox. There is also a toolbar button to activate the History window.